package com.season.seasonStudy.javase.j_018_properties;

import java.util.ResourceBundle;
/**
 * ResourceBundle从 properties文件 获得想要的信息
 */
public class Test {
	public static void main(String[] args) {
		ResourceBundle rb= ResourceBundle.getBundle("j24/properties/jdbc");
		ResourceBundle rb3= ResourceBundle.getBundle("j24.properties.jdbc");
		ResourceBundle rb4= ResourceBundle.getBundle("j24/properties.jdbc");
		/**
		 * 一切都是从src下开始找的
		 * . / 都可以表示路径
		 * 省略后缀名
		 */
		System.out.println(rb.getString("userpass"));
		ResourceBundle rb2= ResourceBundle.getBundle("propertiesTest");
		System.out.println(rb2.getString("q"));
	}
}
